package com.smart.six.locale;

import java.util.Locale;
import java.util.ResourceBundle;

import static javafx.scene.input.KeyCode.R;

/**
 * 测试国际化信息
 *
 * @author junrui.wang
 * @create 2018/7/13
 */
public class Testi18n {
    public static void main(String[] args) {
        ResourceBundle rb1 = ResourceBundle.getBundle("com/smart/six/locale/i18n/resource");
        ResourceBundle rb2 = ResourceBundle.getBundle("com/smart/six/locale/i18n/resource", Locale.US);
        ResourceBundle rb3 = ResourceBundle.getBundle("com/smart/six/locale/i18n/resource", Locale.CHINA);

        System.out.println("default:" + rb1.getString("common.test"));
        System.out.println("US:" + rb2.getString("common.test"));
        System.out.println("China:" + rb3.getString("common.test"));
    }
}
